/*
 * File      : geo_xxxx.h
 * Change Logs:
 * Date           Author       Notes
 * 2013-07-27    jimmy.lee    first version
 */

#ifndef __GEO_XXXX_H__
#define __GEO_XXXX_H__

#include <rtgui/rtgui.h>
#include <rtgui/image.h>
#include <rtgui/rtgui_system.h>
#include <rtgui/widgets/widget.h>
#include "geo_items.h"

struct geo_xxxx_item
{
	char *text;
	rt_bool_t (*action)(struct rtgui_object *object, void *args);
	void *parameter;
};
DECLARE_TAG(geo_xxxx_item);
DECLARE_CLASS_TYPE(xxxx);
// Gets the type of a list xxxx 
#define GEO_XXXX_TYPE      (RTGUI_TYPE(xxxx))
// Casts the object to a filelist 
#define GEO_XXXX(obj)      (RTGUI_OBJECT_CAST((obj), GEO_XXXX_TYPE, geo_xxxx_t))
// Checks if the object is a filelist xxxx 
#define IS_GEO_XXXX(obj)   (RTGUI_OBJECT_CHECK_TYPE((obj), GEO_XXXX_TYPE))

struct geo_xxxx
{
    struct rtgui_widget parent;
	struct geo_items *items;
};
typedef struct geo_xxxx geo_xxxx_t;

geo_xxxx_t *geo_xxxx_create(/*const struct geo_xxxx_item *items, rt_uint16_t count, */rtgui_rect_t *rect);
void geo_xxxx_destroy(geo_xxxx_t *xxxx);

rt_bool_t geo_xxxx_event_handler(struct rtgui_object *object, struct rtgui_event *event);
void geo_xxxx_set_onitem(geo_xxxx_t *xxxx, rtgui_event_handler_ptr func);
void geo_xxxx_load_items(geo_xxxx_t *xxxx, const struct geo_xxxx_item *item_base, rt_uint16_t count);
void geo_xxxx_set_current_item(geo_xxxx_t *xxxx, int index);

#endif

